﻿<!DOCTYPE html>
@using AFT.Parking.Entity;
@using AFT.Parking.Entity.Menus;

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>@ViewBag.Title</title>
    <!--                       CSS                       -->
    <!-- Reset Stylesheet -->
    <link rel="stylesheet" href="/resources/css/reset.css" type="text/css" media="screen" />
    <!-- Main Stylesheet -->
    <link rel="stylesheet" href="/resources/css/style.css" type="text/css" media="screen" />
    <!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid -->
    <link rel="stylesheet" href="/resources/css/invalid.css" type="text/css" media="screen"/>
    <!-- Datepicker Stylesheet. This makes stuff look pretty.-->
    <link href="~/resources/datepicker/laydate-skin.css" rel="stylesheet" />
    <link href="~/resources/datepicker/laydate.css" rel="stylesheet" />
    
    <link href="~/resources/datetimepicker/jquery.datetimepicker.css" rel="stylesheet" />
    <link href="~/resources/css/font-awesome.min.css" rel="stylesheet" />
    <!--                       Javascripts                       -->
    <!-- jQuery -->
    <script src="/Scripts/jquery-1.10.2.js"></script>
    <!-- jQuery Configuration -->
    <script type="text/javascript" src="/resources/scripts/simpla.jquery.configuration.js"></script>
    <!-- Facebox jQuery Plugin -->
    <script type="text/javascript" src="/resources/scripts/facebox.js"></script>
    <script src="/res/js/Common.js"></script>
    <!-- DatePicker Plugin-->
    <script src="~/resources/datepicker/laydate.dev.js"></script>
    <script src="~/resources/datetimepicker/jquery.datetimepicker.full.js"></script>

    @RenderSection("Head", false)

</head>
<body>
    <div id="body-wrapper">
        <!-- Wrapper for the radial gradient background -->
        <div id="sidebar">
            <div id="sidebar-wrapper">
                <!-- Sidebar with logo and menu -->
                <!-- Logo (221px wide) -->
                <p style="font-size: 25px; text-align: center; color: white; vertical-align: middle; font-weight: bold;">二维码信息管理</p>
                <!-- Sidebar Profile links -->
                @{
                    var customer = Session["Customer"] as Customer;
                }
                @if (customer != null)
                {
                    <div id="profile-links">
                        您好, <a href="javascript:void(0);" title="Edit your profile">@customer.UserName</a>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <a href="/Account/SignOut" title="Sign Out">退出</a>
                    </div>
                }
                <ul id="main-nav">
                    <!-- Accordion Menu -->
                    @{
                        var menus = Session["menus"] as List<FirstMenu>;
                        string currentUrl = ("/" + ViewContext.RouteData.Values["controller"].ToString() + "/" + ViewContext.RouteData.Values["action"].ToString()).ToLower();
                        int i = 0;
                    }
                    @foreach (var item in menus)
                    {
                        <li>
                            @{
                        string urls = string.Empty;
                        foreach (var sItem in item.SecondMenus)
                        {
                            urls += sItem.ContainsUrl + ",";
                        }
                        string c = urls.ToLower().Split(',').Contains(currentUrl) ? "current" : "";
                            }
                            <a href="#" name="firstMenu" varid="@i" class="nav-top-item @c">
                                <!-- Add<,,> the class "current" to current menu item -->
                                @item.Name
                            </a>
                            <ul>
                                @foreach (var sItem in item.SecondMenus)
                                {
                                    <li><a href="@sItem.Url" class="@(sItem.ContainsUrl.ToLower().Split(',').Contains(currentUrl)?"current":"")">@sItem.Name</a></li>
                                }
                            </ul>
                        </li>
                                i++;
                    }
                </ul>
                <!-- End #main-nav -->
                <!-- End #messages -->
            </div>
        </div>
        <!-- End #sidebar -->
        <div id="main-content">
            @RenderBody()
            <!-- Main Content Section with everything -->
            <!-- End Notifications -->
            <div id="footer">
                <small>
                    <!-- Remove this notice or replace it with whatever you want -->
                    &#169; 版权： 2016 深圳市筑智通科技有限公司
                </small>
            </div>
            <!-- End #footer -->
        </div>
        <!-- End #main-content -->
    </div>
</body>
<!-- Download From www.exet.tk-->
</html>
